package com.kingwang.training.designpattern.bridge.bo;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

@ToString
@EqualsAndHashCode
public abstract class Bag {
    @Getter
    private String name;

    private Color color;

    public String getColor() {
        if (this.color == null) {
            return "No Color";
        }

        return this.color.getColor();
    }

    public Bag(String name, Color color) {
        this.name = name;
        this.color = color;
    }
}
